import { ref } from 'vue'
import { defineStore } from 'pinia'

// 类型声明

export const useNavActionStore = defineStore('navAction', () => {
  const fixedHeader = ref<boolean>(true) //头部信息定位
  const fixedCategory = ref<boolean>(true) //分类信息定位
  const showHeader = ref<boolean>(true) //头部信息
  const showCategory = ref<boolean>(true) //分类信息
  const foceFixedHeader = ref<boolean>(false) //强制显示 固定头部信息

  const setFixedHeader = (status: boolean) => {
    fixedHeader.value = status
  }

  const setFixedCategory = (status: boolean) => {
    fixedCategory.value = status
  }

  const setShowHeader = (status: boolean) => {
    showHeader.value = status
  }

  const setShowCategory = (status: boolean) => {
    showCategory.value = status
  }

  const setFoceFixedHeader = (status: boolean) => {
    foceFixedHeader.value = status
  }

  return {
    fixedHeader,
    fixedCategory,
    showHeader,
    showCategory,
    setFixedHeader,
    setShowHeader,
    setFixedCategory,
    setShowCategory,
    setFoceFixedHeader,
    foceFixedHeader
  }
})
